home *** CD-ROM | disk | FTP | other *** search
/ Linux Cubed Series 3: Developer Tools / Linux Cubed Series 3 - Developer Tools.iso / devel / lang / lisp / stk-3.002 / stk-3 / STk-3.1 / Demos / filebox.stklos < prev    next >
Encoding:
Text File  |  1996-07-21  |  1.3 KB  |  37 lines

  1. #!/usr/local/bin/stk -f
  2. ;;;; f i l e b o x  . s t k l o s     -- A demo of the <FileBox> class
  3. ;;;;
  4. ;;;; Copyright ⌐ 1993-1996 Erick Gallesio - I3S-CNRS/ESSI <eg@unice.fr>
  5. ;;;; 
  6. ;;;; Permission to use, copy, and/or distribute this software and its
  7. ;;;; documentation for any purpose and without fee is hereby granted, provided
  8. ;;;; that both the above copyright notice and this permission notice appear in
  9. ;;;; all copies and derived works.  Fees for distribution or use of this
  10. ;;;; software or derived works may only be charged with express written
  11. ;;;; permission of the copyright holder.  
  12. ;;;; This software is provided ``as is'' without express or implied warranty.
  13. ;;;;
  14. ;;;; This software is a derivative work of other copyrighted softwares; the
  15. ;;;; copyright notices of these softwares are placed in the file COPYRIGHTS
  16. ;;;;
  17. ;;;;           Author: Erick Gallesio [eg@kaolin.unice.fr]
  18. ;;;;    Creation date: 12-Jun-1994 11:24
  19. ;;;; Last file update: 21-Jul-1996 11:26
  20.  
  21. (require "Tk-classes")
  22.  
  23. (define b (make <Button> :text "Quit the demo" :foreground "red" :command '(exit)))
  24. (pack b)
  25.  
  26.  
  27. ;;; Just create a filebox and return the selected value
  28. (let loop ((result (make-file-box)))
  29.   (apply format #t (if result
  30.                (list "You have selected the file ~S\n" result)
  31.                (list "CANCEL. No file selected\n")))
  32.   (loop (make-file-box)))
  33.  
  34.  
  35.  
  36.  
  37.